<?php
namespace Application\Api\Controller;

class Bank extends Base
{

    private function getService()
    {
        return $this->get(SERVICE_BANK);
    }

    /*
        /Api/Bank/getList
    */
    public function getListAction()
    {
        $data = $this->getRequestData();
        $page = (int)tryGet($data, 'page', 1);
        $limit = (int)tryGet($data, 'limit', 10);
        $temp = $this->getService()->getList($page, $limit);
        $send = [
            'list' => $temp['list']
        ];
        $send = addPageInformation($send, $page, $limit, $temp['count']);
        $this->sendSuccess($send);
    }

}